import { S } from '../../s';
import { IPSDEEndLogic } from './ipsdeend-logic';
import { IPSDELogic } from './ipsdelogic';
import { IPSDELogicParam } from './ipsdelogic-param';
import { PSDELogicNodeImpl } from './psdelogic-node-impl';

export class PSDEEndLogicImpl
  extends PSDELogicNodeImpl
  implements IPSDEEndLogic
{
  get dstFieldName(): string {
    return this.M.dstFieldName;
  }

  get rawValue(): string {
    return this.M.rawValue;
  }

  get rawValueStdDataType():
    | 0
    | 1
    | 2
    | 3
    | 4
    | 5
    | 6
    | 7
    | 8
    | 9
    | 10
    | 11
    | 12
    | 13
    | 14
    | 15
    | 16
    | 17
    | 18
    | 19
    | 20
    | 21
    | 22
    | 23
    | 24
    | 25
    | 26
    | 27
    | 28
    | 29 {
    return this.M.rawValueStdDataType != null ? this.M.rawValueStdDataType : 0;
  }

  protected returnparam: IPSDELogicParam;
  getReturnParam(): IPSDELogicParam | null {
    if (this.returnparam != null) return this.returnparam;
    const value = this.M.getReturnParam;
    if (value == null) {
      return;
    }
    const ipsdelogic = this.getParentPSModelObject(S._200) as IPSDELogic;
    if (ipsdelogic != null) {
      this.returnparam = ipsdelogic.findPSDELogicParam(value);
    }
    return this.returnparam;
  }

  get returnType():
    | 'NONEVALUE'
    | 'NULLVALUE'
    | 'SRCVALUE'
    | 'LOGICPARAM'
    | 'LOGICPARAMFIELD'
    | 'BREAK' {
    return this.M.returnType;
  }
  get cls(): string {
    return 'PSDEEndLogicImpl';
  }
  instanceof(cls: string): boolean {
    if (cls == S._3aa) return true;
    return super.instanceof(cls);
  }
}
